package com.yskj.mwk.service;


import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.pagehelper.PageInfo;
import com.yskj.mwk.bean.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

public interface UserService {
    List<User> getUsers();
    User getUserTellByCode(String code,String openid);
    String getWxOpenId(String code);
    String getUserUuid(String openid);
    User getUserDescByUuid(String uuid);
    int updateUserInfo(String uuid, String headUrl, String name);
    int updateAddress(Address address);
    int addAddress(Address address);
    int updateNoAddressDefault(String uuid);
    int updateAddressDefault(int id);
    int deleteAddressById(int id);
    List<Address> getAllAddressByUuid(String uuid);
    Address getAddressDesc(int id);
    List<Sort> getOneLevelSort();
    List<Sort> getSecondLevelSort(int parentId);
    PageInfo<Goods> getGoodsBySearchName(String name,int pageNum, int pageSize);
    PageInfo<Goods> getIndexNewGoods(int pageNum, int pageSize,int type);
    PageInfo<Goods> getIndexPopularGoods(int pageNum, int pageSize);
    PageInfo<Goods> getGoodsBySortId(int pageNum, int pageSize,int sort1Id,int sort2Id);
    PageInfo<CollectGoods> getMyCollectedGoods(int pageNum, int pageSize, String uuid);
    int cancelCollectionById(int id,String uuid);
    int addCollectionById(int id,String uuid);
    GoodsDesc getGoodsDescById(int id) throws JsonProcessingException;
    int checkGoodsIsCollect(int id,String uuid);
    GoodsSku getGoodsSkuByIndexStr(int id,String index);
    int batchAddSkuTest(int id);
    int addGoodsInCar(int skuId,int spuId,String uuid,int num);
    int deleteGoodsInCarById(int id);
    PageInfo<Car> getMyCarGoods(int pageNum, int pageSize, String uuid);
    int updateGoodsNumInCar(int id,int num);
    Map<String, Object> updateGoodsGuigeInCar(int id,String index,int spuId);
    Map<String, Object> getSpecJsonBySpuId(int spuId);
    SystemOrderDesc addOrder(String ids,String uuid);
    PageInfo<MyOrder> getMyOrders(String uuid,int orderStatus ,int pageNum, int pageSize);
    PageInfo<MyOrder> getMyAfterOrders(String uuid ,int pageNum, int pageSize);
    OrderBean getMyOrderDescById(String orderId);
    int updateOrderStatus(String orderId,int orderStatus,String url);
    SystemOrderDesc addOrderNow(String uuid,int spuId,int skuId,int num);
    int addFeedback(String uuid,String question);
    List<LogisticsDetail> queryTrajectory(String trackingNo,int supplierId);
    List<WuliuDesc> queryTrajectory2(String trackingNo);
    int updateOrderAddress(String orderId,int addressId,int type);
    int checkOrderStatus(String orderId,int type);
    int updateSysOrderStatus(String orderId,int type);
    List<TemplateSort> getTempImageSort(int spuId,int type);
    List<TemplateImage> getTempImageBySortId(int sortId,int spuId,int type);
    int saveEditImage(String orderId,int oid,String editImage1,String editImage2,String num);
    int saveEditImage2(int carId,String editImage1,String editImage2,String num);

    String getIndexMarketingPoster();

    int getSystemOrderPayStatus(String orderId);

    String getTankuangEditTipImage(int spuId,int imageType);

    TempImage getEditTemplateImage(int spuId);

    //pay
    long getOrdertotalPriceByOrderId(String orderId,int payType);

    void wxPayCallbackUpdateOrderStatus(String orderId,String payType,String transactionId,String out_trade_no);

    boolean checkOrderIsPay(String orderId,int payType);
}
